import {Component, Input, OnInit} from '@angular/core';
import {_HttpClient} from '@delon/theme';
import {environment} from '@env/environment';

@Component({
    selector: 'app-myimgload',
    templateUrl: './myimgload.component.html',
})
export class MyimgloadComponent implements OnInit {

     _srcimg;

    constructor() {
    }

    ngOnInit() {
    }

    @Input() set srcimg(img) {
        if (img.startsWith('http')) {
            this._srcimg = img;
        } else {
            this._srcimg = environment.SERVER_URL + 'Upload/' + img;
        }

    }


}
